local sk__fuzhu = fk.CreateSkill {

  name = "sk__fuzhu",

  tags = { Skill.Limited, },

}



sk__fuzhu:addEffect("active", {
  name = "sk__fuzhu",
  anim_type = "offensive",
  card_num = 0,
  target_num = 1,
  prompt = "#sk__fuzhu",
  can_use = function(self, player)
    return player:usedSkillTimes(sk__fuzhu.name, Player.HistoryGame) == 0
  end,
  target_filter = function(self, player, to_select, selected, selected_cards)
    return #selected == 0 and to_select ~= player
  end,
  card_filter = Util.FalseFunc,
  on_use = function(self, room, effect)
    local player = effect.from
    local target = effect.tos[1]
    while not player.dead and not target.dead do
      local id = room:getNCards(1, "bottom")[1]
      room:moveCardTo(id, Card.Processing, nil, fk.ReasonJustMove, sk__fuzhu.name, nil, true, player)
      room:delay(800)
      if Fk:getCardById(id).color == Card.Black then
        local card = Fk:cloneCard("slash")
        card:addSubcard(id)
        card.skillName = sk__fuzhu.name
        if not player:isProhibited(target, card) then
          room:useVirtualCard("slash", { id }, player, target, sk__fuzhu.name, true)
        else
          break
        end
      else
        room:moveCardTo(id, Card.DiscardPile, nil, fk.ReasonJustMove, sk__fuzhu.name, nil, true, player)
        break
      end
    end
  end,
})

return sk__fuzhu
